#!/usr/bin/python

import re

f = open("passwd")
for i in f:
    if re.findall(r'^[^rmf].*\n$',i):
        print(i,end="")
f.close()
